#include "NCube.h"


NCube::NCube()
{

}

NCube::NCube(double dim, double s)
{
	dimensions = dim;
	side = s;
}

double NCube::getDimensions()
{
	return dimensions;
}

double NCube::getSide()
{
	return side;
}

bool NCube::pointInside(double *position, double error)
{
	//Must pass in a position with as many dimensions as the cube
	for(int i=0; i<dimensions; i++)
	{
		if(abs(position[i]) > side)
		{
			return false;
		}
	}
	return true;
}